package com.aspose.cells;

import java.util.HashMap;

class zyi {
   int a;
   byte[] b;
   int c;
   Object d;
   int e;
   short f;
   private byte g;

   zyi(int var1, int var2) {
      this.a = -1;
      this.g = 0;
      this.e = var1;
      this.f = (short)var2;
   }

   zyi(int var1, int var2, byte[] var3) {
      this.a = -1;
      this.g = 0;
      this.e = var1;
      this.f = (short)var2;
      this.b = var3;
   }

   zyi(int var1, int var2, String var3) {
      this(var1, var2);
      byte[] var4 = zakq.a(var3);
      if (var4.length == var3.length()) {
         this.b = new byte[var4.length + 1];
         System.arraycopy(var4, 0, this.b, 1, var4.length);
         this.b[0] = 0;
      } else {
         var4 = Encoding.getUnicode().a(var3);
         this.b = new byte[var4.length + 1];
         System.arraycopy(var4, 0, this.b, 1, var4.length);
         this.b[0] = 1;
      }

      this.g = (byte)(this.g | 128);
   }

   zaz a() {
      return null;
   }

   zaaz b() {
      return null;
   }

   byte c() {
      return (byte)(this.g & 255 & 3);
   }

   void a(byte var1) {
      this.g = (byte)(this.g & 252);
      this.g |= var1;
   }

   boolean d() {
      return (this.g & 255 & 4) != 0;
   }

   void a(boolean var1) {
      if (var1) {
         this.g = (byte)(this.g | 4);
      } else {
         this.g = (byte)(this.g & 251);
      }

   }

   boolean e() {
      return (this.g & 255 & 8) != 0;
   }

   void b(boolean var1) {
      if (var1) {
         this.g = (byte)(this.g | 8);
      } else {
         this.g = (byte)(this.g & 247);
      }

   }

   boolean f() {
      return (this.g & 255 & 32) != 0;
   }

   boolean g() {
      return (this.g & 255 & 64) != 0;
   }

   boolean h() {
      return false;
   }

   boolean i() {
      return (this.g & 255 & 16) != 0;
   }

   void a(zaay var1) {
      this.g = (byte)(this.g | 16);
      byte[] var2;
      if (this.a() != null) {
         var2 = this.a().d();
      } else {
         var2 = this.b;
      }

      zaba var3 = var1.f();
      var3.a(var2, 0, -1);

      while(true) {
         while(var3.e()) {
            int var4 = var3.c();
            switch(var2[var4]) {
            case 1:
            case 2:
               zaye var5 = var3.a(var1);
               zyi var6 = this.a(var1.e, var5.b(), var5.d());
               if (var6 == null || var6.a() == null) {
                  return;
               }

               var2 = var6.a().d();
               var3.a(var2, 0, -1);
               var4 = var3.c();
               break;
            case 33:
            case 65:
            case 97:
               this.a(com.aspose.cells.b.a.zc.e(var2, var4 + 1) & '\uffff');
               var3.b(var4 + 3);
               break;
            case 34:
            case 66:
            case 98:
               this.a(com.aspose.cells.b.a.zc.e(var2, var4 + 2) & '\uffff' & 32767);
               var3.b(var4 + 4);
               break;
            default:
               var3.h();
            }
         }

         return;
      }
   }

   private void a(int var1) {
      switch(var1) {
      case 63:
      case 74:
      case 78:
      case 125:
      case 148:
      case 221:
         this.g = (byte)(this.g | 32);
         break;
      case 344:
         this.g = (byte)(this.g | 64);
      }

   }

   private zyi a(Cells var1, int var2, int var3) {
      if (var2 == this.e && var3 == this.f) {
         return this;
      } else {
         zp var4 = var1.getRows().a.a(var2);
         if (var4 == null) {
            return null;
         } else {
            int var5 = var4.b(var3);
            if (var5 < 0) {
               return null;
            } else {
               return var4.h(var5) != 5 ? null : (zyi)var4.i(var5);
            }
         }
      }
   }

   boolean j() {
      return (this.g & 255 & 128) != 0;
   }

   String k() {
      if ((this.g & 255 & 128) != 0) {
         try {
            return this.b[0] == 0 ? zco.a(this.b, 1, this.b.length - 1) : Encoding.getUnicode().a(this.b, 1, this.b.length - 1);
         } catch (Exception var2) {
            throw new CellsException(5, "Invalid formula");
         }
      } else {
         return null;
      }
   }

   void a(WorksheetCollection var1, int var2) {
      if ((this.g & 255 & 128) != 0) {
         String var3 = null;

         try {
            if (this.b[0] == 0) {
               var3 = zco.a(this.b, 1, this.b.length - 1);
            } else {
               var3 = Encoding.getUnicode().a(this.b, 1, this.b.length - 1);
            }
         } catch (Exception var5) {
            throw new CellsException(5, "Invalid formula");
         }

         this.b = var1.x().a(var2, this.e, this.e, var3.trim(), (byte)0);
         this.g = (byte)(this.g & 127);
      }

   }

   boolean l() {
      return false;
   }

   boolean m() {
      return false;
   }

   boolean a(Cells var1) {
      if (this.b == null) {
         return false;
      } else {
         return var1.r().x().a((byte)2, this.b);
      }
   }

   boolean b(Cells var1) {
      if (this.e()) {
         return false;
      } else if (this.b == null) {
         return false;
      } else {
         return var1.r().x().a((byte)1, this.b);
      }
   }

   boolean a(Cells var1, WorksheetCollection var2, HashMap var3, HashMap var4) {
      if (this.b != null) {
         if (var2.x().a((byte)1, this.b)) {
            byte var5 = 0;
            byte var6 = 0;
            int[] var7 = new int[]{var5};
            int[] var8 = new int[]{var6};
            var2.x().a(this.b, var7, var8);
            int var12 = var7[0];
            int var13 = var8[0];
            Cell var9 = var1.checkCell(var12, var13);
            if (var9 != null) {
               zaz var10 = var9.D();
               byte[] var11 = var10.d();
               return zyo.a(var11, -1, -1, var2, var3, var4);
            }
         }

         if (zyo.a(this.b, -1, -1, var2, var3, var4)) {
            return true;
         }
      }

      return false;
   }

   void a(zyi var1) {
      this.b = var1.b;
      this.g = var1.g;
      this.a(false);
      this.c = var1.c;
      this.d = var1.d;
   }

   zyi a(int var1, int var2, WorksheetCollection var3, WorksheetCollection var4, CopyOptions var5) {
      zyi var6 = new zyi(var1, var2);
      var6.a(this);
      if ((this.g & 255 & 128) != 0) {
         var6.b = new byte[this.b.length];
         System.arraycopy(this.b, 0, var6.b, 0, this.b.length);
      } else {
         var6.b = zyd.a(var3, var4, this.b, -1, 0, 0);
         if (var5 != null && var5.d != null) {
            zyo.b(var6.b, -1, -1, var5.d, var4);
         }
      }

      return var6;
   }

   static long a(int var0, int var1) {
      return (long)var0 << 32 | (long)var1;
   }

   static int a(long var0) {
      return (int)(var0 >> 32);
   }

   static int b(long var0) {
      return (int)(var0 & 4294967295L);
   }

   void a(ReferredAreaCollection var1, zaay var2) {
      this.e(var2);
      zaba var3 = var2.f();
      var3.a(this.b, 0, -1);
      if (var3.e()) {
         zaye var4;
         zyi var5;
         zaz var6;
         if (var2.i) {
            var4 = var3.a(var2);
            var5 = this.a(var2.e, var4.b(), var4.d());
            if (var5 != null && var5.l()) {
               var2.g = var4.b();
               var2.h = (short)var4.d();
               var6 = var5.a();
               var2.l = var6.a();
               var3.a(var6.d(), 0, -1);
               zabh.a(var1, var2, var3);
            }
         } else if (this.b[var3.c()] == 1) {
            var4 = var3.a(var2);
            var5 = this.a(var2.e, var4.b(), var4.d());
            if (var5 != null) {
               var6 = var5.a();
               var2.j = true;
               var2.l = var6.a();
               var3.a(var6.d(), 0, -1);
               zabh.a(var1, var2, var3);
            }
         } else {
            zabh.a(var1, var2, var3);
         }
      }
   }

   void b(zaay var1) {
      this.e(var1);
      boolean var2 = false;
      if (var1.p.Q.i.d && !var1.p.Q.i.e && var1.d()) {
         var1.p.Q.i.e = true;
         var2 = true;
      }

      int var3 = this.c;
      Object var4 = this.d;
      if (var1.p.Q.i.e) {
         com.aspose.cells.a.c.zl.a(com.aspose.cells.b.a.zr.a(var1.b(new StringBuilder(com.aspose.cells.b.a.zr.a(var1.p.Q.i.b)))));
      }

      if (var1.i) {
         this.b(var1, true);
      } else {
         zaba var5 = var1.f();
         var5.a(this.b, 0, -1);
         if (!var5.e()) {
            this.a((byte)2);
            return;
         }

         zaye var6;
         zyi var10;
         long var15;
         if (this.b[var5.c()] == 1) {
            var1.j = true;
            var1.k = true;
            var6 = var5.a(var1);
            if (!var1.p.w && var1.p.s != 3) {
               var15 = Cell.a(var1.n, var6.b(), var6.d());
               zeo var16 = (zeo)var1.p.a((Object)var15);
               if (var16 != null) {
                  var1.l = var16.a;
                  var16.a(var1);
                  this.b(var16.c, var1);
                  var16.a();
                  --var16.b;
                  if (var16.b == 0) {
                     var1.p.b((Object)var15);
                  }
               } else {
                  var10 = this.a(var1.e, var6.b(), var6.d());
                  if (var10 != null && var10.a() != null) {
                     zaz var11 = var10.a();
                     if (var11.a().b()) {
                        var5.a(var11.d(), 0, -1);
                        zyg var12 = new zyg(var1, var11.d(), var5);
                        var1.k = false;
                        this.a(var12, var1);
                     } else {
                        var1.l = var11.a();
                        var1.c();
                        zagu var19 = (new zyg(var1, var11.d(), 0, -1, false)).a();
                        var16 = new zeo(var19, var1);
                        var1.p.a(var15, var16);
                        this.b(var19, var1);
                        var16.a();
                        --var16.b;
                        if (var16.b == 0) {
                           var1.p.b((Object)var15);
                        }
                     }
                  } else {
                     if (var1.p.Q.i.a) {
                        com.aspose.cells.a.c.zl.a(com.aspose.cells.b.a.zr.a(var1.c((StringBuilder)null).append(": SharedFormula without header formula")));
                     }

                     this.a((byte)2);
                  }
               }
            } else {
               zyi var7 = this.a(var1.e, var6.b(), var6.d());
               if (var7 != null && var7.a() != null) {
                  zaz var8 = var7.a();
                  var5.a(var8.d(), 0, -1);
                  zyg var9 = new zyg(var1, var8.d(), var5);
                  var1.k = false;
                  this.a(var9, var1);
               } else {
                  if (var1.p.Q.i.a) {
                     com.aspose.cells.a.c.zl.a(com.aspose.cells.b.a.zr.a(var1.c((StringBuilder)null).append(": Formula with token[01] without header formula")));
                  }

                  this.a((byte)2);
               }
            }
         } else if (this.b[var5.c()] == 2) {
            var6 = var5.a(var1);
            var15 = Cell.a(var1.n, var6.b(), var6.d());
            zep var17 = (zep)var1.p.a((Object)var15);
            if (var17 == null) {
               var10 = this.a(var1.e, var6.b(), var6.d());
               if (var10 != null && var10.b() != null) {
                  var17 = zep.a(var10.b(), var1);
                  if (var1.p.s != 3 && var17.b > 1) {
                     var1.p.a(var15, var17);
                  }
               } else {
                  if (var1.p.Q.i.a) {
                     com.aspose.cells.a.c.zl.a(com.aspose.cells.b.a.zr.a(var1.c((StringBuilder)null).append(": TableFormula without header formula")));
                  }

                  this.a((byte)2);
               }
            }

            if (var17 != null) {
               zagu var18 = var17.b(var1);
               var1.l = var17.a;
               var1.k = true;
               this.b(var18, var1);
               --var17.b;
               if (var17.b == 0) {
                  var17.a(var1);
                  var1.p.b((Object)var15);
               }
            }
         } else {
            zyg var14 = new zyg(var1, this.b, var5);
            this.a(var14, var1);
         }
      }

      if (var1.p.Q.i.e) {
         if (var1.p.Q.i.c.a(var3, var4, this.c, this.d)) {
            StringBuilder var13 = new StringBuilder(com.aspose.cells.b.a.zr.a(var1.p.Q.i.b));
            var1.b(var13);
            var13.append(": Old [");
            zfl.a(var3, var4, var13);
            var13.append("], New [");
            zfl.a(this.c, this.d, var13);
            var13.append("]");
            com.aspose.cells.a.c.zl.a(com.aspose.cells.b.a.zr.a(var13));
            if (!var2) {
               com.aspose.cells.a.c.zl.b((String)null);
            }
         }

         if (var2) {
            var1.p.Q.i.e = false;
            var1.p.Q.i.d = false;
         }
      }

   }

   private void b(zaay var1, boolean var2) {
      zaba var3 = var1.f();
      var3.a(this.b, 0, -1);
      zaye var4 = var3.a(var1);
      long var5 = Cell.a(var1.n, var4.b(), var4.d());
      zel var7 = (zel)var1.p.a((Object)var5);
      if (var7 != null) {
         var1.l = var7.a;
         var1.g = var7.a.StartRow;
         var1.h = (short)var7.a.StartColumn;
         this.b(zayc.a(var7.c, this.e - var7.a.StartRow, this.f - var7.a.StartColumn), var1);
      } else {
         zyi var8 = this.a(var1.e, var4.b(), var4.d());
         if (var8 != null && var8.l()) {
            var1.g = var4.b();
            var1.h = (short)var4.d();
            zaz var15 = var8.a();
            CellArea var10 = var15.a();
            var1.l = var10;
            zahn var11 = null;
            zagu var12 = (new zyg(var1, var15.d(), 0, -1, false)).a();
            if (var12 == zzk.a) {
               var1.e.a(var10, var10.StartRow, var10.StartColumn, new zgu(2), false, false);
            } else {
               if (var8 != this) {
                  int var13 = var8.c() & 255;
                  if (var13 == 1) {
                     var1.p.a(var8);
                  } else if (var13 == 2) {
                     if (var1.p.Q.i.a) {
                        StringBuilder var14 = new StringBuilder();
                        var14.append("Calculated header without cached result, finish all cells in array formula. Maybe ");
                        var1.a(var14);
                        if (var8 != this) {
                           var14.append("<-");
                           var14.append(CellsHelper.cellIndexToName(this.e, this.f));
                        }

                        com.aspose.cells.a.c.zl.a(com.aspose.cells.b.a.zr.a(var14));
                     }

                     var1.e.a(var10, var10.StartRow, var10.StartColumn, new zgu(2), false, false);
                     return;
                  }
               }

               var8.a((byte)1);
               var11 = var1.a(var8, var12);
               if (var11 != null) {
                  var11.b(true);
                  var8.a((byte)0);
                  if (var10.b()) {
                     this.b(var11.a(0, 0), var1);
                  } else {
                     var7 = new zel(var10, var11);
                     var1.p.a(var5, var7);
                     switch(var12.b()) {
                     case 5:
                     case 7:
                     case 8:
                        if (!var2 && var11.b() != 7 && var11.b() != 5) {
                           var2 = true;
                        }

                        if (var11.l() || var11.m() && var10.e() > 1 || var11.n() && var10.f() > 1) {
                           var11 = var11.c(var1);
                        }
                        break;
                     case 6:
                     default:
                        var2 = true;
                     }

                     if (var2) {
                        var1.e.a(var7.a, var1.g, var1.h, new zyi.za(var1, var5, var7), false, false);
                        var7.c.a(true);
                        var1.p.b((Object)var5);
                     } else {
                        this.b(zayc.a(var11, this.e - var7.a.StartRow, this.f - var7.a.StartColumn), var1);
                     }

                  }
               }
            }
         } else {
            if (var1.p.Q.i.a) {
               StringBuilder var9 = new StringBuilder();
               var9.append("Cannot get array formula header ");
               var1.c(var9);
               com.aspose.cells.a.c.zl.a(com.aspose.cells.b.a.zr.a(var9));
            }

            this.a((byte)2);
         }
      }
   }

   private void a(zyg var1, zaay var2) {
      if (this.c() == 1) {
         var2.a(this, var1);
      } else {
         this.a((byte)1);
         var2.a(this, var1);
         this.a((byte)2);
      }

   }

   private void b(zagu var1, zaay var2) {
      if (!var1.f()) {
         if (this.c() == 1) {
            var2.b(this, var1);
         } else {
            this.a((byte)1);
            var2.b(this, var1);
            this.a((byte)2);
         }
      } else {
         this.a(var1, var2);
         if (this.c() == 0) {
            this.a((byte)2);
         }
      }

   }

   void a(zagu var1, zaay var2) {
      switch(var1.b()) {
      case 0:
         this.c = 3;
         this.d = ((zyz)var1).c();
         return;
      case 1:
         this.c = 2;
         this.d = var1.c();
         return;
      case 2:
         this.c = 4;
         this.d = var1.c();
         return;
      case 3:
         if (!((zyy)var1).l()) {
            zst var10 = zst.f;
            this.c = 3;
            this.d = com.aspose.cells.a.c.zi.a(zsk.b(var10));
            return;
         } else {
            if (var2.p.m) {
               Style var3 = var2.p.g.B().a(var2.e.c(this.e, this.f));
               zafy var4 = null;
               if (var3.getCustom() != null && !"".equals(var3.getCustom())) {
                  var4 = var2.p.k.a(var3.getCustom(), true);
               } else if (var3.getNumber() != 0) {
                  var4 = var2.p.k.e(var3.getNumber());
               }

               if (var4 != null) {
                  switch(var4.a()) {
                  case 2:
                  case 4:
                  case 5:
                  case 6:
                     double var5 = ((zyy)var1).k();
                     double var7 = ((zj)var4).a(var5);
                     if (var5 != var7) {
                        zfv var9 = new zfv();
                        zavz.a(var7, var9);
                        this.c = var9.c;
                        this.d = var9.d;
                        return;
                     }
                  case 3:
                  }
               }
            }

            this.c = 1;
            this.d = var1.c();
            return;
         }
      case 4:
      case 5:
      case 6:
      case 7:
      case 8:
      case 9:
      case 10:
      case 11:
      default:
         if (com.aspose.cells.a.c.zl.a()) {
            com.aspose.cells.a.c.zl.a("Unsupported calculated result[type=" + var1.b() + ", value=" + var1.c() + "]");
         }

         this.c = 1;
         this.d = zml.g;
         return;
      case 12:
         this.c = 1;
         this.d = zml.g;
      }
   }

   boolean c(zaay var1) {
      return this.c() != 2;
   }

   boolean d(zaay var1) {
      if (this.c() == 2) {
         return false;
      } else if (this.c() == 0) {
         return true;
      } else {
         var1.p.a(this);
         return false;
      }
   }

   zagu n() {
      return (zagu)(this.c == 4 ? new zaam((String)this.d) : zaaq.a(this.c, this.d));
   }

   zagu a(zaay var1, boolean var2) {
      zyg var3 = new zyg(var1, this.b, 0, -1, false);
      zagu var4 = var3.a();
      if (var4 != zzk.a) {
         return var4;
      } else {
         zaba var5 = var3.b();
         var5.a(this.b, 0, -1);
         if (var5.e()) {
            byte var6 = this.b[var5.c()];
            if (var6 == 1 || var6 == 2) {
               zaye var7 = var5.a(var1);
               if (var5.e()) {
                  return zzk.a;
               }

               zyi var8 = this.a(var1.e, var7.b(), var7.d());
               if (var6 == 1) {
                  zaz var9 = var8.a();
                  if (var9 != null) {
                     if (!var8.l()) {
                        var1.j = true;
                     }

                     return (new zyg(var1, var9.d(), 0, -1, false)).a();
                  }
               } else if (var8.b() != null) {
                  zaaz var12 = var8.b();
                  zzi var10 = new zzi(32, zabk.b("TABLE"));
                  zagu[] var11 = null;
                  if (var12.d()) {
                     if (var12.b()) {
                        if (var12.c()) {
                           return var10;
                        }

                        var11 = new zagu[]{new zaal(32, new zaye((zur)null, var12.b, var12.c)), new zaal(32, new zaye((zur)null, var12.a.StartRow - 1, var12.a.StartColumn - 1)), new zaal(32, new zaye((zur)null, var12.a.StartRow - 1, this.f))};
                     } else if (var12.c()) {
                        var11 = new zagu[]{new zaal(32, new zaye((zur)null, var12.b, var12.c)), new zaal(32, new zaye((zur)null, var12.a.StartRow - 1, var12.a.StartColumn - 1)), new zaal(32, new zaye((zur)null, this.e, var12.a.StartColumn - 1))};
                     } else {
                        var11 = new zagu[]{new zaal(32, new zaye((zur)null, var12.b, var12.c)), new zaal(32, new zaye((zur)null, var12.d, var12.e)), new zaal(32, new zaye((zur)null, var12.a.StartRow - 1, var12.a.StartColumn - 1)), new zaal(32, new zaye((zur)null, this.e, var12.a.StartColumn - 1)), new zaal(32, new zaye((zur)null, var12.a.StartRow - 1, this.f))};
                     }
                  } else if (var12.e()) {
                     if (var12.b()) {
                        return var10;
                     }

                     var11 = new zagu[]{new zaal(32, new zaye((zur)null, var12.b, var12.c)), new zaal(32, new zaye((zur)null, var12.a.StartRow - 1, this.f)), new zaal(32, new zaye((zur)null, this.e, var12.a.StartColumn - 1))};
                  } else {
                     if (var12.c()) {
                        return var10;
                     }

                     var11 = new zagu[]{new zaal(32, new zaye((zur)null, var12.b, var12.c)), new zaal(32, new zaye((zur)null, this.e, var12.a.StartColumn - 1)), new zaal(32, new zaye((zur)null, var12.a.StartRow - 1, this.f))};
                  }

                  var10.a((zagu[])var11, (zaay)null);
                  return var10;
               }
            }
         }

         return zzk.a;
      }
   }

   private void e(zaay var1) {
      var1.f = this;
      var1.a = 0;
      var1.g = this.e;
      var1.h = this.f;
      var1.i = this.e();
      var1.j = false;
      var1.k = false;
      var1.l = CellArea.a;
      var1.m = 0;
   }

   void a(Cell var1, Object var2) {
      zfv var3 = new zfv();
      if (var3.a(var2, false)) {
         this.c = var3.c;
         this.d = var3.d;
      } else {
         this.a(var1, var3);
      }

   }

   void a(Cell var1, zfv var2) {
      switch(var2.c) {
      case 1:
         double var3 = zbtq.a((DateTime)var2.d, var1.getWorksheet().getWorkbook().getSettings().getDate1904());
         if (var3 < 0.0D) {
            this.c = 4;
            this.d = com.aspose.cells.b.a.zr.a(var2.d);
         } else {
            this.c = 1;
            this.d = var3;
         }
         break;
      case 4:
         this.c = 4;
         this.d = var2.d;
         break;
      default:
         this.c = 4;
         this.d = com.aspose.cells.b.a.zr.a(var2.d);
      }

   }

   public String toString() {
      StringBuilder var1 = new StringBuilder(64);
      var1.append(CellsHelper.cellIndexToName(this.e, this.f));
      var1.append(": Flag=");
      com.aspose.cells.b.a.g.zf.a(var1, this.c());
      var1.append("; Value=");
      var1.append(this.d);
      if (this.l()) {
         var1.append("; IsArrayHeader");
      } else if (this.m()) {
         var1.append("; IsSharedHeader");
      } else if (this.e()) {
         var1.append("; IsInArray");
      }

      if (this.i()) {
         if (this.g()) {
            var1.append("; IsSubtotal");
         }

         if (this.f()) {
            var1.append("; IsVolatile");
         }
      }

      return com.aspose.cells.b.a.zr.a(var1);
   }

   private class za implements zaft {
      private zaay b;
      private zel c;
      private int d;
      private int e;
      private long f;
      private zfv g = new zfv();

      za(zaay var2, long var3, zel var5) {
         this.b = var2;
         this.f = var3;
         this.c = var5;
         this.d = var5.c.c();
         this.e = var5.c.d();
      }

      public boolean a(zp var1, int var2) {
         zfv var3 = var1.a(var2, this.g, 5);
         if (var3.c == 5) {
            zyi var4 = (zyi)var3.d;
            int var6 = var1.h() - this.b.g;
            Object var5;
            int var7;
            if (var6 >= this.d) {
               if (this.d != 1) {
                  var5 = zzb.a;
               } else {
                  var7 = var3.a - this.b.h;
                  if (var7 >= this.e) {
                     if (this.e != 1) {
                        var5 = zzb.a;
                     } else {
                        var5 = this.c.c.a(0, 0);
                     }
                  } else {
                     var5 = this.c.c.a(0, var7);
                  }
               }
            } else {
               var7 = var3.a - this.b.h;
               if (var7 >= this.e) {
                  if (this.e != 1) {
                     var5 = zzb.a;
                  } else {
                     var5 = this.c.c.a(var6, 0);
                  }
               } else {
                  var5 = this.c.c.a(var6, var7);
               }
            }

            var4.b((zagu)var5, this.b);
            --this.c.b;
            if (this.c.b == 0) {
               this.b.p.b((Object)this.f);
            }

            return true;
         } else {
            return false;
         }
      }
   }
}
